/**************************************************************************************
*
*	Copyright (C) 2009 - 2012 Brent Andrew O. Chua - See LICENSE.txt for more info.
*		
*	Filename	-	ParameterBinder.cpp
*
*	Comments	-	See ParameterBinder.h
*
**************************************************************************************/
#include "../Include/IParameterBinder.h"

namespace Pulse
{
	IParameterBinder::IParameterBinder( void )
		: m_pParam( PSX_NULL )
	{

	}

	IParameterBinder::~IParameterBinder( void  )
	{
		
	}

	void IParameterBinder::SetAsScalar( const BOOL val )
	{
		PSX_PushError( "Invalid function to call with this data type." );
	}

	void IParameterBinder::SetAsScalar( const INT val )
	{
		PSX_PushError( "Invalid function to call with this data type." );
	}

	void IParameterBinder::SetAsScalar( const UINT val )
	{
		PSX_PushError( "Invalid function to call with this data type." );
	}

	void IParameterBinder::SetAsScalar( const FLOAT val )
	{
		PSX_PushError( "Invalid function to call with this data type." );
	}

	void IParameterBinder::SetAsMatrix( const Matrix4x4 *pData )
	{
		PSX_PushError( "Invalid function to call with this data type." );
	}

	void IParameterBinder::SetAsMatrixArray( const Matrix4x4 *pData, SIZE_T arraySize )
	{
		PSX_PushError( "Invalid function to call with this data type." );
	}

	void IParameterBinder::SetAsShaderResource( Texture2D *pTexture )
	{
		PSX_PushError( "Invalid function to call with this data type." );
	}

	void IParameterBinder::SetAsVector3( const Vector3 *pData )
	{
		PSX_PushError( "Invalid function to call with this data type." );
	}

	void IParameterBinder::SetAsVector4( const Vector4 *pData )
	{
		PSX_PushError( "Invalid function to call with this data type." );
	}

	void IParameterBinder::SetAsSamplerState( SamplerState *pState )
	{
		PSX_PushError( "Invalid function to call with this data type." );
	}

	void IParameterBinder::SetAsConstantBuffer( ConstantBuffer *pBuffer )
	{
		PSX_PushError( "Invalid function to call with this data type." );
	}

	void IParameterBinder::SetParameter( IParameter *pParam )
	{
		pParam->GetType();
		GetType();
		if ( pParam->GetType() == GetType() )
			m_pParam = pParam;
		else
			PSX_PushWarning( "Invalid parameter set to ParameterBinder." );
	}
}